<template>
  <div class="home">
    <!--   搜索   -->

    <div class="top">
      <van-icon v-show="isAuhor"  size="25"  name="https://b.yzcdn.cn/vant/icon-demo-1126.png" />
      <van-search class="felx1"
  v-model="value"
  placeholder="请输入搜索关键词"
  input-align="center"
/>
      <span  v-show="!isAuhor">登录</span>
     
    </div>

<!--播图 -->

<swiper></swiper>



    <!--  分类 -->
    <h1>{{value}}</h1>
    <coma :uuid="value"  @yyid="getyyid"></coma>
    {{$store.getters.getcount}}
    <!-- 商品 -->





  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from "@/components/HelloWorld.vue";
import coma from "@/components/coma.vue";

export default {
  name: "HomeView",
  data(){
    return { 
      value: "asd",
      isAuhor:false
    }
  },
  methods:{
    onSearch(value){
      console.log(value);
    },
    onCancel(){
      console.log(123456);
    },
    getyyid(data){
      console.log(123,data);
      this.value = data.value
    }
  },
  components: {
    HelloWorld,coma
  },
  mounted(){
    //  this.isAuhor = true
  }
};
</script>

<style lang="scss" scoped>
  .top{ 
       display: flex;
       align-items: center;
       padding:0  1rem;
       color: rgb(13, 173, 236);
  }
  .felx1{ 
    flex:1;
  }

</style>